

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>PHP Vulnerability Hunter Guide</title></head>
<body>
    
    <h1>PHP Vulnerability Hunter Guide</h1>
    
<div>
<h2>Sections</h2>
<ol>
<li><span><a href="#section1">Before You Start</a></span></li>
<li><span><a href="#section2">Installing The Web Server</a></span></li>
<li><span><a href="#section3">Installing The Application</a></span></li>
<li><span><a href="#section4">Running A Scan</a></span></li>
<li><span><a href="#section5">Analyzing Results</a></span></li>
</ol>
<h2><span><a name="section1"></a>1. Before You Start</span></h2>
<span>This guide focuses on scanning PHP web applications hosted using XAMPP in a Windows environment. While it is possible to scan applications hosted with a web server running on a different operating system, PHP Vulnerability Hunter itself can only be run using windows, and it must have write access to the PHP files it is scanning.</span><br /><br /><span>For PHP Vulnerability Hunter to properly run .NET Framework 3.5 SP1 or higher must be installed.</span><br />
<h2><span><a name="section2"></a>2. Installing The Web Server</span></h2>
</div>
<div><span>For this scan we will use XAMPP 1.7.3. At the time of this writing the most recent version of XAMPP is 1.7.4. However, by using a release that contains an older version of PHP we can detect vulnerabilities that would not be exploitable in more recent versions, notably those that involve null byte injection.</span></div>
<div><span><br /></span></div>
<div>Download:<br /><a href="http://sourceforge.net/projects/xampp/files/XAMPP%20Windows/1.7.3/" target="_blank"><span>http://sourceforge.net/projects/xampp/files/XAMPP%20Windows/1.7.3/</span></a></div>
<div>&nbsp;</div>
<div>Installation directions:</div>
<div><a href="http://www.apachefriends.org/en/xampp-windows.html#522" target="_blank">http://www.apachefriends.org/en/xampp-windows.html#522</a><br /><br /><span>After following the directions to install and configure XAMPP we have a local web server to test against. The author of this tutorial installed XAMPP to <span style="font-family: 'andale mono', times;">c:\tools</span>, resulting in an htdocs folder located at <span style="font-family: 'andale mono', times;">c:\tools\xampp\htdocs. </span></span><br /><br /><span>Now we&rsquo;re ready to install a less-than-secure web application, appropriately named Insecure.</span></div>
<div>
<h2><span><a name="section3"></a>3. Installing The Application</span></h2>
<span>Our target application, <a href="/Content/insecure-php-1.zip">Insecure</a>, can be installed by extracting the archive into the htdocs folder.&nbsp;</span><br /><br /><span>To ensure everything is properly configured navigate to </span><a href="http://localhost/insecure"><span>http://localhost/insecure</span></a><span> in a browser. If an error is displayed ensure that the web server is properly configured and that the application has been extracted to the htdocs directory.</span><br /><br /><span>Now that we have our hole ridden application running it is time to scan it using PHP Vulnerabilitiy Hunter.</span><br />
<h2><span><a name="section4"></a>4. Running A Scan</span></h2>
</div>
<div><span>First, start the PHP Vulnerability Hunter Launcher by running PHPVH-GUI.exe. Upon doing so you will be greeted by a screen containing several options. Assuming the target web server is running locally the first setting, server, should be fine with its default setting, localhost.</span></div>
<div><span><br /></span></div>
<div><span>Next, configure the webroot. The author of this guide is using XAMPP installed at <span style="font-family: 'andale mono', times;">C:\tools</span>, so the value for this setting is <span style="font-family: 'andale mono', times;">c:\tools\XAMPP\htdocs</span>.</span></div>
<div><span><br /></span></div>
<div><span>Finally, the application needs to be configured. Uncheck "Scan all apps in webroot" or "Scan entire webroot" (depending on the PHP Vulnerability Hunter version), located under options, and enter &ldquo;insecure&rdquo; in the Apps text box. The rest of the settings should be fine by default. Click the start button and, if prompted, grant the application administrative privileges. PHP Vulnerability Hunter will then use dynamic analysis to map the application and attempt to launch attacks using the discovered input vectors.</span><br /><br /><a href="./Content/Images/PHPVHGuide-1.png" target="_blank"><img style="width: 240px;" src="./Content/Images/PHPVHGuide-1.png" alt="" /></a></div>
<div>
<div>
<h2><span><a name="section5"></a>5. Analyzing Results</span></h2>
</div>
<div>When the scan is completed if any vulnerabilities are detected a report is created. If the "Open vulnerabity report viewer" option is enabld the report is automatically opened in the GUI viewer. Alternatively, the text file version of the report can be opened in nearly any document viewer.</div>
</div>

            
            <br />
            <br />
            <br />
            <div class="copyright">Copyright &copy; 2011 Leitch LLC <a href="http://www.autosectools.com" target="_blank">http://www.autosectools.com</a></div>            
        </div>
        <div style="float:right;width: 100%;height:20px;">
            
        </div>
    </div>

</body>
</html>